<template>
  <div id="app">
    <el-button type="success">成功按钮</el-button>
    <component :is="yzButton" :itemData="data" />
    <yzButton :itemData="itemData" />
    <yzButton :itemData="data" />
  </div>
</template>

<script lang="ts" setup>
import yzButton from '../../src/components/uiComponents/yzButton.vue'
//src\components\uiComponents\yzButton.vue
import { yzButtonAttribute } from '../../src/class/ui/yzButtonAttribute'
import { glEvent } from "../events/glEvent";
import { ref } from 'vue'
const itemData = {
  title: "这是一个按钮",
  type: "danger"
}

const data = ref(new yzButtonAttribute());
glEvent.ui.addSubcribe("yzButton", () => {
  console.log("进来了定义的订阅事件")
})
console.log(data);

setInterval(() => {
  data.value.title += "1"
  console.log(data);
}, 100000);
</script>
